/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package eu.bopet.jocadv.core;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author bocskapeter
 */
public abstract class Constraint extends Element implements Serializable {

    private List<Element> elementList;
    private Parameter parameter;

    public Constraint(String name) {
        super(name);
        this.elementList = new ArrayList<Element>();
    }

    public List<Element> getElementList() {
        return elementList;
    }

    public void setElementList(List<Element> elementList) {
        this.elementList = elementList;
    }

    public void addToElementList(Element element) {
        this.elementList.add(element);
    }

    public Parameter getParameter() {
        return parameter;
    }

    public void setParameter(Parameter parameter) {
        this.parameter = parameter;
    }

    @Override
    public String toString() {
        return "\n Constraint{" + super.toString() + "elementList=" + elementList + ", parameter=" + parameter + '}';
    }

}
